Matrix Magic

Unlock the secrets of matrices with interactive learning!

Exercise 1: Matrix Multiplication Orders

Find the order of the product matrix \( AB \) if:

A
3×3
4×3
4×2
4×5
1×1
B
3×3
3×2
2×2
5×1
1×3
For matrix multiplication \( AB \) to be possible, the number of columns in A must equal the number of rows in B.
The resulting matrix will have dimensions: (rows of A) × (columns of B)
1. A: 3×3, B: 3×3 → AB: 3×3
2. A: 4×3, B: 3×2 → AB: 4×2
3. A: 4×2, B: 2×2 → AB: 4×2
4. A: 4×5, B: 5×1 → AB: 4×1
5. A: 1×1, B: 1×3 → AB: 1×3

Exercise 2: General Matrix Multiplication

If \( A \) is of order \( p \times q \) and \( B \) is of order \( q \times r \), what is the order of \( AB \) and \( BA \)?

For \( AB \):
- Columns of A (\( q \)) must match rows of B (\( q \))
- Result will have rows from A and columns from B
Order of \( AB \): \( p \times r \)
For \( BA \):
- Columns of B (\( r \)) must match rows of A (\( p \))
- Only possible if \( r = p \)
Order of \( BA \): \( q \times q \) (if \( r = p \))
Otherwise, \( BA \) is not defined

Exercise 3: Finding Matrix Dimensions

\( A \) has '\( a \)' rows and '\( a + 3 \)' columns. \( B \) has '\( b \)' rows and '\( 17 - b \)' columns, and if both products \( AB \) and \( BA \) exist, find \( a, b \)?

For \( AB \) to exist:
Columns of A = Rows of B → \( a + 3 = b \)
For \( BA \) to exist:
Columns of B = Rows of A → \( 17 - b = a \)
Now we have two equations:
1. \( b = a + 3 \)
2. \( 17 - b = a \)
Substitute equation 1 into equation 2:
\( 17 - (a + 3) = a \)
\( 14 - a = a \)
\( 14 = 2a \)
\( a = 7 \)
Then \( b = 7 + 3 = 10 \)
Final answer: \( a = 7 \), \( b = 10 \)

Exercise 4: Matrix Multiplication

If \[ A = \begin{pmatrix} 2 & 5 \\ 4 & 3 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & -3 \\ 2 & 5 \end{pmatrix} \] find \( AB, BA \) and verify \( AB = BA \)?

Calculating \( AB \):
\[ AB = \begin{pmatrix} 2×1 + 5×2 & 2×(-3) + 5×5 \\ 4×1 + 3×2 & 4×(-3) + 3×5 \end{pmatrix} \]
\[ AB = \begin{pmatrix} 2 + 10 & -6 + 25 \\ 4 + 6 & -12 + 15 \end{pmatrix} = \begin{pmatrix} 12 & 19 \\ 10 & 3 \end{pmatrix} \]
Calculating \( BA \):
\[ BA = \begin{pmatrix} 1×2 + (-3)×4 & 1×5 + (-3)×3 \\ 2×2 + 5×4 & 2×5 + 5×3 \end{pmatrix} \]
\[ BA = \begin{pmatrix} 2 - 12 & 5 - 9 \\ 4 + 20 & 10 + 15 \end{pmatrix} = \begin{pmatrix} -10 & -4 \\ 24 & 25 \end{pmatrix} \]
Comparing \( AB \) and \( BA \):
\[ AB = \begin{pmatrix} 12 & 19 \\ 10 & 3 \end{pmatrix} \neq \begin{pmatrix} -10 & -4 \\ 24 & 25 \end{pmatrix} = BA \]
Conclusion: Matrix multiplication is not commutative in general!

Exercise 5: Distributive Property

Given that \[ A = \begin{pmatrix} 1 & 3 \\ 5 & -1 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & -1 & 2 \\ 3 & 5 & 2 \end{pmatrix}, \quad C = \begin{pmatrix} 1 & 3 & 2 \\ -4 & 1 & 3 \end{pmatrix} \] verify that \( A(B + C) = AB + AC \).

First, calculate \( B + C \):
\[ B + C = \begin{pmatrix} 1+1 & -1+3 & 2+2 \\ 3-4 & 5+1 & 2+3 \end{pmatrix} = \begin{pmatrix} 2 & 2 & 4 \\ -1 & 6 & 5 \end{pmatrix} \]
Now calculate \( A(B + C) \):
\[ A(B + C) = \begin{pmatrix} 1×2 + 3×(-1) & 1×2 + 3×6 & 1×4 + 3×5 \\ 5×2 + (-1)×(-1) & 5×2 + (-1)×6 & 5×4 + (-1)×5 \end{pmatrix} \]
\[ = \begin{pmatrix} 2 - 3 & 2 + 18 & 4 + 15 \\ 10 + 1 & 10 - 6 & 20 - 5 \end{pmatrix} = \begin{pmatrix} -1 & 20 & 19 \\ 11 & 4 & 15 \end{pmatrix} \]
Calculate \( AB \):
\[ AB = \begin{pmatrix} 1×1 + 3×3 & 1×(-1) + 3×5 & 1×2 + 3×2 \\ 5×1 + (-1)×3 & 5×(-1) + (-1)×5 & 5×2 + (-1)×2 \end{pmatrix} \]
\[ = \begin{pmatrix} 1 + 9 & -1 + 15 & 2 + 6 \\ 5 - 3 & -5 - 5 & 10 - 2 \end{pmatrix} = \begin{pmatrix} 10 & 14 & 8 \\ 2 & -10 & 8 \end{pmatrix} \]
Calculate \( AC \):
\[ AC = \begin{pmatrix} 1×1 + 3×(-4) & 1×3 + 3×1 & 1×2 + 3×3 \\ 5×1 + (-1)×(-4) & 5×3 + (-1)×1 & 5×2 + (-1)×3 \end{pmatrix} \]
\[ = \begin{pmatrix} 1 - 12 & 3 + 3 & 2 + 9 \\ 5 + 4 & 15 - 1 & 10 - 3 \end{pmatrix} = \begin{pmatrix} -11 & 6 & 11 \\ 9 & 14 & 7 \end{pmatrix} \]
Now calculate \( AB + AC \):
\[ AB + AC = \begin{pmatrix} 10 - 11 & 14 + 6 & 8 + 11 \\ 2 + 9 & -10 + 14 & 8 + 7 \end{pmatrix} = \begin{pmatrix} -1 & 20 & 19 \\ 11 & 4 & 15 \end{pmatrix} \]
We can see that \( A(B + C) = AB + AC \), verifying the distributive property!

Exercise 6: Commutative Property

Show that the matrices \[ A = \begin{pmatrix} 1 & 2 \\ 3 & 1 \end{pmatrix}, \quad B = \begin{pmatrix} 1 & -2 \\ -3 & 1 \end{pmatrix} \] satisfy commutative property \( AB = BA \).

Calculate \( AB \):
\[ AB = \begin{pmatrix} 1×1 + 2×(-3) & 1×(-2) + 2×1 \\ 3×1 + 1×(-3) & 3×(-2) + 1×1 \end{pmatrix} \]
\[ = \begin{pmatrix} 1 - 6 & -2 + 2 \\ 3 - 3 & -6 + 1 \end{pmatrix} = \begin{pmatrix} -5 & 0 \\ 0 & -5 \end{pmatrix} \]
Calculate \( BA \):
\[ BA = \begin{pmatrix} 1×1 + (-2)×3 & 1×2 + (-2)×1 \\ (-3)×1 + 1×3 & (-3)×2 + 1×1 \end{pmatrix} \]
\[ = \begin{pmatrix} 1 - 6 & 2 - 2 \\ -3 + 3 & -6 + 1 \end{pmatrix} = \begin{pmatrix} -5 & 0 \\ 0 & -5 \end{pmatrix} \]
Compare \( AB \) and \( BA \):
\[ AB = \begin{pmatrix} -5 & 0 \\ 0 & -5 \end{pmatrix} = BA \]
These particular matrices do commute (\( AB = BA \)), which is unusual for matrix multiplication!